!{include file='common/iheader.htm'}
<div id="i_nav">
	<h3 class="page_title">文章管理</h3>
	<a class="button" href="/manager.php?app=article_cate">文章分类管理</a>
	<a class="button" href="/manager.php?app=article&act=edit">添加文章</a> 
	<a class="button" href="/manager.php?app=article&act=recommend&type=0">引用管理</a> 
</div>
<form method="post" action="/manager.php?app=article&act=add_recommend" id="article_form">
	<ul class="list_view">
		!{foreach from=$articles item=article key=id}
		<li>
			<strong>
				<label>
					<input type="checkbox" name="article_ids[]" value="!{$id}"/> !{$article.title}
				</label>
			</strong>
			<div class="opt_div">
				<a href="javascript:void(0)">删除</a>
				<a href="/manager.php?app=article&act=edit&id=!{$id}">修改</a>
				<a href="/manager.php?app=article&act=view&id=!{$id}">预览</a>
			</div>
		</li>
		!{foreachelse}
		<li>
			<strong>暂无记录...</strong>
		</li>
		!{/foreach}
	</ul>
	
	<div class="option_div">
		!{html_options name="type" options=$types}
		<input type="button" value="设置" class="button submit_btn">
		<div class="pager">
			!{include file='common/pager.htm'}
		</div>
	</div>
</form>
<script>
	$(function(){
		$('#article_form').ajax_form({
			'submit_btn' : '.submit_btn',
			'success' : function(form, data){
				if(data.result){
					//保存成功
					window.location.href = '/manager.php?app=article&act=recommend&type=' + $('select[name="type"]').val();
				}
			}
		});
		
	});
</script>
!{include file='common/ifooter.htm'}